Program and documentation written by Peter N. Lewis Ph. D.
Apple is a registered trademark of Apple Computer Inc.
Macintosh is a trademark licensed to Apple Computer Inc.
Copyright1986 ESSENTIAL PROCESSOR INSTRUMENTS
Portions of the program copyright Microsoft Corporation 1984,1986
System Requirements: 512K Macintosh or MacPlus and Imagewriter printer. A second disk drive is useful but not essential.
INTRODUCTION
CURVES is a Macintosh™ program for the scientist or engineer who needs to plot and analyze data obtained from equipment such as HPLC (high pressure liquid chromatographs), GC (gas chromatographs) and densitometers. Data from all of these experiments istypically a series of values with increasing time or perhaps distance (these are called serial data). Invariably there are a large number of data points and very often one isinterested in only a small portion of the whole chromatogram. Furthermore since this is real data, there are often shifts in the baseline or sloping baselines. CURVES makes the work up of data with real life imperfections easy, so that corrected plots and accurate
integration of areas under peaks in any portion of the chromatogram can be obtained.
CURVES is written in compiled Microsoft Basic and in most respects follows the Macintosh interface. For most mouse commands there are keyboard equivalents and the clipboard is supported for graphic transfers to the scrapbook. Hard copy of the plots and the data are readily produced. Data can be entered manually or read from disk files of data collected from analog to digital conversions or generated by other programs. CURVES can handle a data string of up to 5000 values. Most desk top accessories function while CURVES is running.
DATA
Since this program involves data analysis, how the data is read in and stored in CURVES is of central importance.
DATA Format
Data stored in CURVES files are integers ( e.g. 1 instead of 1.0). This does not mean that the precision of real numbers is lost, as a scaling factor
( a real number) is included which allows conversion from one form to the other. Integer arrays take up much less memory than real arrays and computations are much faster. Further since thescreen resolution is 512 pixels in x by 320 pixels in y, integer representations are perfectly adequate. A CURVES data file, which is a text file, has the following format. Each value is followed by a return.
N is the number of data points for K=1 or pairs when K=2.
If K=1 then the data is Y serial X, thus the quantities in brackets are not present.
If K=2 then the data is X first then Y for each pair.
YMIN is the smallest value of Y, YMAX the largest. DFY is the difference between YMAX
and YMIN. The corresponding X values for these quantities are provided when K=2.
These values are reals, not integers and thus allow conversion of the integer data to
reals when needed.
DATA Entry
Data may be entered into CURVES in two ways. For those whose eschew the
mouse the symbol at the right enclosed in brackets, shown below, is the equivalent case independent (upper or lower case) keyboard command.
Keyboard Input <K>
Choosing this mode of data input the user is requested to specify y data only or x and y pairs. Following this, the user enters data at the prompt. Numerical input can be of virtually any type with decimals, exponentiation and signs. Type E followed by the return key to end input. The data can then be edited, saved or graphed. Note only 100 data points can be entered this way for larger sets of data use a word processor and the CURVES data conversion program supplied.
File Input <F>
Choosing file input results in a files dialog box with the list of files on your CURVES disk. Should you have data on another disk simply click on EJECT and theninsert the data disk. Once the data is loaded this disk will be ejected and you will beprompted to reinsert your CURVES disk. If you have an external drive no disk ejection will be needed as you data disk can be in the other drive. If the file you choose is not adata file you will be returned to the list of files where you can choose another file or cancel this choice. Once the data file is loaded some general information about the file is briefly displayed on the screen and the entire data curve plotted. Data files arise from the Keyboard Input option, from other applications which can generate text files such as Multiplan, Overvue, Jazz and any word processor program. The data format for these latter files is not precisely the same as that described above, as the number of data points, type, scaling factor and data minimum and maximum values are not included. There is a utility program called CURVES data conversion which will make the necessary conversion should it be needed.
Options
Once the data has been input the resulting plot is displayed and the DATA IN menu is replaced by the OPTIONS menu. From this pull down menu a variety of functions are available.
ZOOM
When this option is chosen a vertical line appears wherever the mouse cursor is. Move this line until it is located at the extreme left of the region to be expanded. Click the mouse button. Repeat with the extreme right limit. The auto scaled curve will be plotted in an expanded mode. The original curve may be replotted by choosing the REPLOT option or a combined plot showing both the original and expanded plots by choosing the COMBINED PLOT option. Another zoom can be carried out when the original curve has been replotted. You cannot ZOOM in an already zoomed plot.
PRINT SCREEN
This option will dump the curve on the screen to the printer and is active in original, expanded and combined plot displays.
VIEW DATA
This command allows one to view the original data file in a compact format.
An initial question provides the option of printed copy.
NEW DATA
Begins the process of data entry again. The current curves are lost.
BASELINE / INTEGRATION
These functions can be applied to total and expanded plots. The BASELINE function precedes the INTEGRATION function as it is used in the integration process. The purpose of the BASELINE function is to define what you think is
the zero value for your data. Simply click your mouse along the proposed baseline from left to right. After the second and subsequent clicks a straight line is drawn from one point to the next. While it is possible to hold the mouse button down continuously, this generates a large number of small straight lines which will slow down subsequent calculations. If there are more than 100 points the program will not accept them and will begin the BASELINE option again. Usually only a small number of lines (3-5) are needed. When you are finished place your mouse cursor on the E and click or simply type E. If you want a default baseline simply place your mouse cursor on the E and click
or simply type E. In this instance the baseline is defined as a straight line from the first data point to the last data point. The baseline is shown and you are given the options of proceeding with baseline subtraction /integration, starting the baseline again or cancelling the whole process.
Integration
Next the baseline corrected curve is shown with options to save the expanded curve data to disk, to cancel or to proceed with integration. Cancellation moves you back to the original curve where integration was begun. The save to disk option prompts for a filename under which a new Curves file be saved. Choosing integration you are presented with the maximum and minimum values of the data. You are then prompted for the threshold and minimum # of points per peak. The threshold is the minimum value of the curve before integration begins. A good rule of thumb is to choose a threshold which is greater than 5% of the maximum-minimum values. The minimum # of points per peak is given to allow the rejection of spikes. A value of 5 usually works well. Once the
calculation is completed a hard copy option is provided. There is also an option at this point to save the results of the analysis to disk. The resulting text data file is compatible with Microsoft Multiplan™ and Cricket Graph™ programs. The absolute and percentage areas as well as the beginning , peak position and ending integration points are presented in tabular form. If a print out is requested then following the table the corrected plot is also printed.
What's Next
Following integration all of the usual options are available to you. New data may be loaded or you may replot and zoom to a different region.
QUIT in the OPTIONS menu Returns you to the startup menu. QUIT in the startup menu returns you to the desktop.
Clipboard
The most recent curve is placed on the Clipboard when it is drawn. If youwish to save it, simply get out the Scrapbook from the Apple menu and type command V. This will save the graph to the Scrapbook which can be retrieved later for more complete labelling in MacPaint or MacDraw. The scrapbook will overwrite the screen, your curve can be easily regenerated by the redraw menu option.
Coming "Real Soon Now"
We are presently evaluating relatively low cost digitizers so that CURVES can acquire data directly from your equipment. When this option is available we expect that data collection will take place in the background so that analysis can be performed simultaneously.